<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

class MY_Controller extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->library('session');
        if (!$this->session->userdata('loggedin'))
        {
        	$this->load->helper('url');
            redirect('sessions/login');
        }
    }
}

/* End of file MY_Controller.php */